import React, { Component } from 'react';
import {Popup} from 'antd-mobile'
import style from './footerAlertMaskList.scss'

class FooterRegionAlertMaskList extends Component {
    constructor(props) {
        super(props);
        this.state = {};
    }

		componentWillMount(){

		}

		componentDidMount() {

		}

		onClickCallBack(name,currentIndex,check,index){
			this.props.onClick&&this.props.onClick(name,currentIndex,check,index)
		}

		onCurrentIndexCallBack(index){
			 this.props.onCurrentIndex&&this.props.onCurrentIndex(index);
		}

    render() {
				let data = this.props.data;
        return (
            <div className={style.footerAlertBoxList}>
	            <li onClick={()=>{this.onClickCallBack(data.timesName,data.currentIndex,data.times,this.props.index);this.onCurrentIndexCallBack(this.props.index)}}>
		            {data.timesName}
		            {
									this.props.currentIndex==this.props.index?<img className={style.choice} src="./images/choice.png"/>:null
	               }
		            </li>

            </div>
        )
    }
}

FooterRegionAlertMaskList.defaultProps = {

}

export default FooterRegionAlertMaskList